package com.weseal.form;

import com.weseal.domain.MasterInfo;
import com.weseal.enums.MasterType;
import org.springframework.beans.BeanUtils;

import java.time.DateTimeException;
import java.util.Date;
import java.util.List;

/**
 * @author weseal
 * @title
 * @description
 * @usage
 * @copyright Copyright 2014  rrmj Corporation. All rights reserved.
 * @company 上海众多美网络科技有限公司
 * @create 2017/9/10
 */
public class MasterInfoForm {

	private Long id;

	private String loginName;

	private String userName;

	private String password;
	
	private String oldPassword;

	private Long type;

	private Boolean lock = Boolean.FALSE;

	private String remark;

	private Date updateTime = new Date();

	private List<Integer> functionIds;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	public Long getType() {
		return type;
	}
	
	public void setType(Long type) {
		this.type = type;
	}
	
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public List<Integer> getFunctionIds() {
		return functionIds;
	}

	public void setFunctionIds(List<Integer> functionIds) {
		this.functionIds = functionIds;
	}

	public Boolean getLock() {
		return lock;
	}

	public void setLock(Boolean lock) {
		this.lock = lock;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	public String getOldPassword() {
		return oldPassword;
	}
	
	public void setOldPassword(String oldPassword) {
		this.oldPassword = oldPassword;
	}
	
	public MasterInfo convert2Domain() {
		MasterInfo masterInfo = new MasterInfo();
		BeanUtils.copyProperties(this, masterInfo);
		return masterInfo;
	}

}
